.ph-switch {
  display: inline-block;
  position: relative;
  /* 使用 em 单位，可以根据 font-size 控制大小 */
  width: 2em;
  height: 1em;
  font-size: 30px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 1em;
  cursor: pointer;
  transition: background-color 0.3s;
  box-sizing: content-box;

  .ph-switch-action {
    position: absolute;
    top: 0;
    left: 0;
    width: 1em;
    height: 1em;
    border-radius: 50%;
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.15);
    transition: transform 0.3s;
  }
}
.ph-switch--on {
  background-color: #1989fa;
  .ph-switch-action {
    transform: translateX(1em);
  }
}
